package com.luozhili.io;

import com.luozhili.io.base.IoDemoBase;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;

public class ReaderDemo extends IoDemoBase {


    public void output() {

    }

    public void input() {

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("file.txt")));
            String s;
            while ((s=reader.readLine())!=null){
                System.out.println("read:  "+s);
            }


        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
